package tests;


import java.io.IOException;

public class SpanningUSA {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		KnuthReader 	reader 	= null;
		UndirectedGraph graph 	= null;
		
		try{
			if(args.length == 0)
				reader = new KnuthReader("data/USA-highway-miles.in");
			else
				reader = new KnuthReader(args[0]);
			graph = new UndirectedGraph(reader.getNumOfVertices(), reader.getNumOfEdges());
			reader.run(graph);
			
			MinimumSpanningTree mst = new MinimumSpanningTree(graph);
			System.out.println("Result: " + mst.runMST("San Diego")); 
			//Washington, San Francisco, San Antonio, Rochester, Weed			
		}
		catch(IOException ex){
			if(reader != null)
				System.err.println("The file (" + reader.getFilePath() + ") could not be found.");
		}
		

		
	}

}
